import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/',
      name: 'Main',
      component: () => import('../views/Main.vue'),
      children: [
        {
          path: '/ShowRabits',
          name: 'ShowRabits',
          component: () => import('../views/Rabits/ShowRabits.vue'),
        },
        {
          path: '/ShowRabitsDetail',
          name: 'ShowRabitsDetail',
          component: () => import('../views/Rabits/ShowRabitsDetail.vue'),
          children: [
                   {
              path: '/FarmingsAll',
              name: 'FarmingsAll',
              component: () => import('../views/Rabits/FarmingsAll.vue'),
            },
            {
              path: '/SlaughtsAll',
              name: 'SlaughtsAll',
              component: () => import('../views/Rabits/SlaughtsAll.vue'),
            },
            {
              path: '/ProcessiingsAll',
              name: 'ProcessiingsAll',
              component: () => import('../views/Rabits/ProcessiingsAll.vue'),
            },
          ]
        }
      ]
    },
  ],
})

export default router
